let homeComponent = {
    template: `
        <div class="home page">
            <div class="head">
                <div class="left"></div>
                <div class="title">MINDLIV</div>
                <div class="right"></div>
            </div>
            <div class="main">
<!--                <p>1.Suggest using this website in a quiet environment </p>-->
<!--                -->
<!--                <p>2.You can create by recording voice and uploading audio files</p>-->
            </div>
             <div class="tabs">
       
          
                 <div class="tab" @click="toPage('Feed')">
                    <span>Feed</span>
                </div>
                <div class="tab" @click="toPage('Library')">
                    <span>Library</span>
                </div>
                <div class="btn" @click="toCreate()">
                    <span class="iconfont icon-ali-jiahao"></span>
                </div>
                <div class="tab">
                    <span>Clients</span>
                </div>
                <div class="tab" @click="toPage('profile')">
                    <span>Profile</span>
                </div>
             </div>

             </div>
        </div>
    `,
    data() {
        return {

        }

    },
    computed: {},
    watch: {},
    mounted() {
    },
    activated() {

    },
    methods: {
        toPage(name){
            this.$router.push({
                name:name
            })
        },
        toCreate(){
            treatmentSession.body = {
                // publishTime: parseTime(new Date()),
                description: 'Tester',
                name: 'New Session',
                state: 0
            }

            treatmentSession.create(treatmentSession.body).then((result)=>{
                section.body = {
                    sessionId: result.id,
                    name: 'Section-' + parseTime(new Date())
                }
                this.$router.push({
                    name: 'recorder',
                    query:{
                        sessionId: result.id
                    }
                })
            })


        }
    },
    components: {},
    beforeRouteLeave(to, from, next) {

        next();
    }
}

